import os

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'your-secret-key-here'
    UPLOAD_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'uploads')
    ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
    MAX_CONTENT_LENGTH = 16 * 1024 * 1024  # 16MB 最大文件大小
    
    # 图片筛选参数
    QUALITY_THRESHOLD = 35
    FACE_RATIO_THRESHOLD = 0.15
    YAW_RANGE = (-30, 30)
    PITCH_RANGE = (-20, 20)
    BLUR_THRESHOLD = 50 